﻿using System;
using System.Globalization;

namespace Itau.IM.Common.Mainframe.Book
{
    [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
    public sealed class BookDateFieldAttribute : BookFieldBaseAttribute
    {
        public string DateTimeFormat { get; set; }
        public CultureInfo Culture { get; set; }

        public BookDateFieldAttribute(int StartIndex, string DateTimeFormat):base(StartIndex)
        {
            this.DateTimeFormat = DateTimeFormat;
            this.Culture = CultureInfo.CurrentCulture;
        }

        public BookDateFieldAttribute(int StartIndex, string DateTimeFormat, CultureInfo Culture)
            : this(StartIndex, DateTimeFormat)
        {
            this.Culture = Culture;
        }

        public BookDateFieldAttribute() : base(0) { }
    }
}
